<?php
//准备装载数据
	require_once("./includes/configure.php");
	require_once("./includes/database.php");
	$db = Database::Connect();
	$zufang_quyu_array = $db->getConfigurationArray('zufang_quyu');
	$zufang_zujin_array = $db->getConfigurationArray('zufang_zujin');
	$ershoufang_mianji_array = $db->getConfigurationArray('ershoufang_mianji');
	$zufang_fangxing_array = $db->getConfigurationArray('zufang_fangxing');
	$ershoufang_leixing_array = $db->getConfigurationArray('zufang_leixing');

	   require_once("./includes/func.php");
		$current_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']."?".initUrl($_SERVER['QUERY_STRING']);

	//挨着拼接url
	//第一个问号
	if(!strpos($current_url,"?")){
		$current_url .= '?sj=lx';
	}
?>
<div class="fcklinks">
<div style="height: 8px; *height: 10px;"><span></span></div>
<div class="condition_links2 condition_link2_def" id="panel_apf_id_9">
<div>
<div class="condition_title">区域：</div>
<div id="apf_id_9_areacontainer" class="container">
<?php echo '<a href="'.deleteRepeatVar($current_url,'quyu').'">';
	if(!$_GET['quyu']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($zufang_quyu_array);$ii++){
		if($_GET['quyu']==$zufang_quyu_array[$ii]['this_id']){
			echo '<a href="'.deleteRepeatVar($current_url,'quyu').'&quyu='.$zufang_quyu_array[$ii]['this_id'].'" title="'.$zufang_quyu_array[$ii]['value'].'"><strong>'.$zufang_quyu_array[$ii]['value'].'</strong></a>';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'quyu').'&quyu='.$zufang_quyu_array[$ii]['this_id'].'" title="'.$zufang_quyu_array[$ii]['value'].'">'.$zufang_quyu_array[$ii]['value'].'</a>';
		}
	}
?><?php
		if($_GET['quyu'] && is_numeric($_GET['quyu'])){
			$zufang_quyu2_array = $db->getConfigurationArray2('zufang_shangquan',$_GET['quyu']);
			$quyu2_right = false;
				for($ii=0;$ii<count($zufang_quyu2_array);$ii++){
					if($_GET['quyu2']==$zufang_quyu2_array[$ii]['this_id']){
						$quyu2_right = true;
						break;
					}
				}
				if(!$quyu2_right){
					$_GET['quyu2'] = null;
				}
			//区域下级
			echo '<div style="border: 1px solid #F39800;margin-right: 10px;padding: 0 0 0 6px;">';
				echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'">';
				if(!$_GET['quyu2']){
					echo '<strong>不限</strong></a>';
				}else{
					echo '不限</a>';
				}
		
				for($ii=0;$ii<count($zufang_quyu2_array);$ii++){
					if($_GET['quyu2']==$zufang_quyu2_array[$ii]['this_id']){
						echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'&quyu2='.$zufang_quyu2_array[$ii]['this_id'].'"  title="'.$zufang_quyu2_array[$ii]['value'].'"><strong>'.$zufang_quyu2_array[$ii]['value'].'</strong></a>';
					}else{
						echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'&quyu2='.$zufang_quyu2_array[$ii]['this_id'].'"  title="'.$zufang_quyu2_array[$ii]['value'].'">'.$zufang_quyu2_array[$ii]['value'].'</a>';
					}
				}
			echo '</div>';
		}
	?>
</div>
</div>

<div>
<div class="condition_title">价格：</div>
<div class="containerprice">
<?php echo '<a href="'.deleteRepeatVar($current_url,'zujin').'">';
	if(!$_GET['zujin']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($zufang_zujin_array);$ii++){
		if($_GET['zujin']==$zufang_zujin_array[$ii]['value']){
			echo '<a href="'.deleteRepeatVar($current_url,'zujin').'&zujin='.$zufang_zujin_array[$ii]['value'].'"  title="'.$zufang_zujin_array[$ii]['C'].'"><strong>'.$zufang_zujin_array[$ii]['C'].'</strong></a> &nbsp;';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'zujin').'&zujin='.$zufang_zujin_array[$ii]['value'].'"  title="'.$zufang_zujin_array[$ii]['C'].'">'.$zufang_zujin_array[$ii]['C'].'</a> &nbsp;';
		}
	}
?>
</div>
</div>

<!--<div>
<div class="condition_title">房龄：</div>
<div class="container" id="apf_id_9_areacontainer"><strong>不限</strong>
	<a href="<2" title="2年内">2年内</a>
	<a href="2-5" title="2-5年">2-5年</a>
	<a href="5-10" title="5-10年">5-10年</a>
	<a href=">10" title="10年以上">10年以上</a>
</div>
</div>

<div>
<div class="condition_title">类型：</div>
<div class="container"><strong>不限</strong>
<?php
	//for($ii=0;$ii<count($ershoufang_leixing_array);$ii++){
		//echo '<a href="'.$current_url.'&leixing='.$ershoufang_leixing_array[$ii]['value'].'"  title="'.$ershoufang_leixing_array[$ii]['C'].'">'.$ershoufang_leixing_array[$ii]['C'].'</a>';
	//}
?>
</div>
</div>-->



</div>
<div class="condition_fake_352"></div>
</div>





<div class="new_result_bar" style="display:none;">
	    <div class="result_bar">
	        <div class="local_search_nh">
	            <form action="" enctype="application/x-www-form-urlencoded" id="ls_form_apf_id_13" class="keywordform">
                <input type="text" maxlength="100" name="kw" id="resultkw" class="kw" value="在结果中搜索" onclick="this.value='';">
                <input type="submit" class="search" value="搜索">
            </form>
	        </div>
	    </div>
    	<ul>
        <li class="asline"></li>
        <li class="condlist_tip"><span>更多筛选：</span></li>
        <li class="">
        	<div id="" class="select_contents">
                <select name="绿化率" style="padding:3px;">
					<option value="">&nbsp;&nbsp;绿化率&nbsp;&nbsp;</option>
					<option value="0.3">&nbsp;&nbsp;高于30%&nbsp;&nbsp;</option>
					<option value="0.4">&nbsp;&nbsp;高于40%&nbsp;&nbsp;</option>
					<option value="0.5">&nbsp;&nbsp;高于50%&nbsp;&nbsp;</option>
					<option value="0.6">&nbsp;&nbsp;高于60%&nbsp;&nbsp;</option>
				</select>
            </div>

        </li>
    	            <li class="checkbox_content">
                        	<input type="checkbox" value="#" id="idcommhasprop" style="float:left;"><label for="idcommhasprop">只看有房源的小区</label>
            </li>
        </ul>
    </div>
<?php
$db->close();
?>